<template >
   

    <el-table :data="tableData" style="width: 100vh">
        <el-table-column type="index" label="序号" width="80" />
        <el-table-column prop="Goodsname" label="商品名称" width="150" />
        <el-table-column prop="Order" label="生产批次" width="120" />
        <el-table-column prop="Expired" label="保质期" width="120" />
        <el-table-column prop="Allownum" label="生产许可证号" width="120" />
        <el-table-column prop="Companyname" label="生产企业" width="120" />
        <el-table-column prop="Cover" label="封面" width="120" />
        <el-table-column prop="Check" label="检查报告" width="120" />
        <el-table-column prop="Finiststate" label="完成状态" width="120" />
        <el-table-column prop="Creator" label="创建人" width="120" />
        <el-table-column prop="Createtime" label="创建时间" width="120" />
        <el-table-column prop="Modifier" label="修改人" width="120" />
        <el-table-column fixed="right" label="操作" min-width="120">
            <template #default>
                <el-button link type="primary" size="small" @click="">
                    删除
                </el-button>
                <el-button link type="primary" size="small">修改</el-button>
            </template>
        </el-table-column>
    </el-table>
</template>
<script lang="ts" setup>
import axios from 'axios';
import { onMounted, reactive, ref } from 'vue';
axios.defaults.baseURL = "http://localhost:5196";
onMounted(() => {
    GetGoods();
});
const tableData = ref([]);
const pages = reactive({
    PageIndex: 1,
    PageSize: 10,
    totalcount: 0
})
const GetGoods = () => {
    axios.get("/api/Goods/GetGoods", {
        params: {
            PageIndex: pages.PageIndex,
            PageSize: pages.PageSize
        }
    }).then(res => {
        tableData.value = res.data.PageData;
        pages.totalcount = res.data.Totalcount;
    })
}
</script>
